package com.paradogs.gs.modules.equip;

import com.paradogs.framework.annotations.serverHandler.PRHandler;
import com.paradogs.framework.annotations.serverHandler.PRMapping;
import com.paradogs.framework.misc.GC;
import com.paradogs.gs.misc.Bow;
import com.paradogs.gs.misc.fastWrap.LongWrapper;

/**
 * @author: yumi
 * @date: 2024/10/23  21:56
 * @Description: TODO
 */
@PRHandler
@PRMapping("equip")
public class EquipHandler {

    /** 穿戴装备 */
    @PRMapping("wear")
    public GC wear(LongWrapper equipId) {
        Bow.asserts(Bow.owner().equipMgr().has(equipId.getVal()), "找不到装备");
        Bow.owner().equipBaseMgr().wear(equipId.getVal());
        return GC.ok();
    }

//    /** 卸下装备 */
//    @PRMapping("takeOff")
//    public Ack takeOff(LongWrapper equipId) {
//        Bow.owner().equipMgr().takeOff(equipId.getVal());
//        return Ack.success();
//    }

//    /** 加宝 */
//    @PRMapping("jiaBao")
//    public Ack jiaBao(CGEquipJiaBao cg) {
//
//        PlayerTemplate curPlayer = PlayerUtils.getCurPlayer();
//        return Ack.success(curPlayer.getEquipMgr().jiaBao(cg.getEquipId(), cg.getPoint(), cg.getProtect()));
//    }
//
//    /** 血炼 */
//    @PRMapping("xueLian")
//    public Ack<GCEquipEasyOperation> xueLian(LongWrapper equipId) {
//        PlayerTemplate curPlayer = PlayerUtils.getCurPlayer();
//        return Ack.success(curPlayer.getEquipMgr().xueLian(equipId.getVal()));
//    }
//
//    /** 强化 */
//    @PRMapping("qiangHua")
//    public Ack<GCEquipEasyOperation> qiangHua(LongWrapper equipId) {
//        return Ack.success(PlayerUtils.getCurPlayer().getEquipMgr().qiangHua(equipId.getVal()));
//    }
//
//    /** 觉醒 */
//    @PRMapping("jueXing")
//    public Ack<BooleanWrapper> jueXing(LongWrapper equipId) {
//        PlayerUtils.getCurPlayer().getEquipMgr().jueXing(equipId.getVal());
//        return Ack.success();
//    }
//
//    /** 附魔 */
//    @PRMapping("fuMo")
//    public void fuMo() {}
//
//    /** 成长 */
//    @PRMapping("chengZhang")
//    public Ack<BooleanWrapper> chengZhang(CGEquipChengZhang cg) {
//        PlayerUtils.getCurPlayer().getEquipMgr().chengZhang(cg.getCurEquipId(), cg.getCostEquipId());
//        return Ack.success();
//    }
//
//
//    /** 出售装备 */
//    @PRMapping("sell")
//    public Ack sell(LongWrapper equipId) {
//        PlayerUtils.getCurPlayer().getEquipMgr().sell(equipId.getVal());
//        return Ack.success();
//    }
//
//    /** 将装备存到装备仓库 */
//    @PRMapping("putStore")
//    public Ack putStore(LongWrapper equipId) {
//        PlayerUtils.getCurPlayer().getEquipMgr().putStore(equipId.getVal());
//        return Ack.success();
//    }
//
//    /** 从装备仓库取出装备 */
//    @PRMapping("getStore")
//    public Ack getStore(LongWrapper equipId) {
//        PlayerUtils.getCurPlayer().getEquipMgr().getStore(equipId.getVal());
//        return Ack.success();
//    }

}
